# the directory where the plugins should be. Make sure this is in your
# shell's LADSPA_PATH
DESTINATION_DIR=~/.ladspa

# the location of the liblo static library, since this is a plugin, we cannot
# rely on dynamic loading
LIBLO_STATIC=/usr/lib/liblo.a

install: install_op install_osc
install_op: op.so
	mkdir -p ${DESTINATION_DIR}
	cp op.so ${DESTINATION_DIR}/.ladspa
op.so: operator.o
	ld operator.o -o op.so -shared
operator.o: operator.c
	gcc -c operator.c
install_osc: osc.so
	mkdir -p ${DESTINATION_DIR}
	cp osc.so ${DESTINATION_DIR}/.ladspa
osc.so: osc.o ${LIBLO_STATIC}
	ld osc.o ${LIBLO_STATIC} -o osc.so -shared
osc.o: lad-osc.c
	gcc -c -g lad-osc.c -o osc.o
clean:
	rm *.o *~ *.so